package com.woniu.cq.medical.service;

import com.woniu.cq.medical.common.Result;
import com.woniu.cq.medical.controller.form.AttendanceRecordForm;
import com.woniu.cq.medical.controller.form.DoctorOrDutyForm;
import com.woniu.cq.medical.controller.form.PatientWaitForm;
import com.woniu.cq.medical.controller.form.VirtualCallMessageForm;
import com.woniu.cq.medical.entity.Doctor;
import com.baomidou.mybatisplus.extension.service.IService;
import com.woniu.cq.medical.entity.Patient;

import java.text.ParseException;
import java.util.Date;
import java.util.List;

import java.util.List;

/**
 * <p>
 *  服务类
 * </p>
 *
 * @author Lucas
 * @since 2020-09-05
 */
public interface DoctorService extends IService<Doctor> {
    //实时显示诊疗进度
    public List<AttendanceRecordForm> showDiagnosisSchedule(Date date);
    //医生登陆
    public Doctor doctorLogin(int doctorId,String doctorPassword);
    //等待患者集合
    public List<Patient> getWaitPatientList(int doctorId);
    //当前就诊患者
    public PatientWaitForm getCurrPatient(int doctorId);

    List<DoctorOrDutyForm> queryAdministrationOrDoctorList(Integer administrativeId) throws ParseException;
    //等到当前医生所在科室名
    String getAdministrativeName(int doctorId);
    //根据挂号表ID更改挂号表中的就诊状态
    void changeRegisterStatusByRegisterId(int registerId,String status);
    //修改医生出诊表中当前患者和等待患者人数
    void changeAttendanceRecord(int doctorId,String currPatient);
    //更改出诊记录表中当前当前患者字段、已就诊人数+1;
    void changeAttendanceRecordCheckedCount(int doctorId, String currPatient);
    //根据医生编号，时间，和就诊状态查询当前医生的就诊中人数
    int selectPatientCountByStatus(int doctorId, String status);
    //修改挂号表中是否过号状态
    void changeRegisterIsValidByRegisterId(int registerId);

    VirtualCallMessageForm getVirtualCallMessageForm(int doctorId);

    Result doctorTreatmentService(int doctorId, String status, String currPatient, int registerId,Doctor doctor);

    Result doctorDiagnoseFinishService(int registerId, String status, int doctorId, String currPatient, Doctor doctor);

    Result doctorPassPatientService(int doctorId, String status, int registerId, Doctor doctor);

    /**
     * 根据科室ID查询医师名单
     * @param administrativeId
     * @return
     */
    List<Doctor> queryDoctorList(Integer administrativeId);

    Doctor userLogin(int doctorId);

    Result addAttendanceRecord(Doctor doctor);
}
